<template>
  <div>
    <zm-detail-table
      :list="activeInfoList"
      :info="activeData"
    ></zm-detail-table>
  </div>
</template>

<script>
import tableMixin from '@/mixins/zmTableMixin'
import { activeInfoList } from '../const'
import ZmDetailTable from '@/components/zmDetailTable'
import saleOrderApi from '@/api/src/saleOrder'

export default {
  components: { ZmDetailTable },
  mixins: [tableMixin],
  props: {
    obj: {
      type: Object,
      default () {
        return {}
      }
    }
  },
  data () {
    return {
      activeData: {}
    }
  },
  computed: {
    activeInfoList () {
      return activeInfoList(this)
    }
  },
  created () {
    this.getInfo()
  },
  methods: {
    async getInfo () {
      const _res = await saleOrderApi.getCardActive({
        orderId: this.obj.saleId
      })
      this.activeData = _res
    }
  }
}
</script>
